home *** CD-ROM | disk | FTP | other *** search
- /* -- ----------------------------------------------------- -- *
- * -- Name........: parser.e -- *
- * -- Description.: Simple module which uses the automatic -- *
- * -- generated parser by EYACC . -- *
- * -- Author......: Daniel Kasmeroglu -- *
- * -- E-Mail......: raptor@cs.tu-berlin.de -- *
- * -- daniel.kasmeroglu@daimlerchrysler.com -- *
- * -- Date........: 05-Mar-00 -- *
- * -- Version.....: 0.1 -- *
- * -- ----------------------------------------------------- -- */
-
- /* -- ----------------------------------------------------- -- *
- * -- Options -- *
- * -- ----------------------------------------------------- -- */
-
- OPT MODULE
-
-
- /* -- ----------------------------------------------------- -- *
- * -- Modules -- *
- * -- ----------------------------------------------------- -- */
-
- MODULE '*yyparse'
-
-
- /* -- ----------------------------------------------------- -- *
- * -- Declarations -- *
- * -- ----------------------------------------------------- -- */
-
- EXPORT DEF glinput
- EXPORT DEF result
-
-
- /* -- ----------------------------------------------------- -- *
- * -- Functions -- *
- * -- ----------------------------------------------------- -- */
-
- ->> PROC parse()
- ->
- -> SPEC parse( tokenfile )
- -> DESC Parses the C-Header which was splitted
- -> before in tokens.
- -> PRE {tokenfile} : File generated by the scanning part.
- -> POST true
- ->
- EXPORT PROC parse( par_scanned ) HANDLE
- DEF par_res
-
- glinput := Open( par_scanned, OLDFILE )
- IF glinput = NIL THEN Raise( "PARS" )
-
- WriteF( 'Parsing...\n' )
- par_res := yyparse()
-
- IF par_res <> 0 THEN Raise( "PARS" )
-
- EXCEPT DO
- IF glinput <> NIL THEN Close( glinput )
- IF exception <> 0 THEN Raise( exception )
- ENDPROC result
- -><
-
-
-